let handler: null | number = null;

export default function (stateObj: Record<string, any>, update: Function) {
    if (handler === null) {
        handler = setInterval(() => {
            update({ helloText: "Context-2-time: " + new Date().toLocaleString() });
        })
    } else {
        clearInterval(handler);
        handler = null;
    }
}